var VALUEFEILD = "rtvalue";//数值的字段名称
var measureType={"yc":"遥测","yx":"遥信","yk":"遥调","yt":"遥控"};
//历史数据表格初始化需要的数据定义，在量测选择对话框确定的时候更新这两个数据，点击查询的时候，销毁表格，然后用这连个数据重建表格。
var columnsT = new Array();
var columnsWidth=80;
var datafields = new Array();
var columngroups = new Array();
//历史查询URL
var his_url = "datagrid_data.json";
var datagrid_data=[                                                          
		{"d_0":"001","d_1":"Name 1","d_2":"Address 11","d_3":"col4 data","d_4":"col4 data","d_5":"col4 data","d_6":"col4 data","d_7":"col4 data","d_8":"col4 data","d_9":"col4 data","d_10":"col4 data","d_11":"col4 data","d_12":"col4 data","d_13":"col4 data","d_14":"col4 data","d_15":"col4 data","d_16":"col4 data"},
		{"d_0":"002","d_1":"Name 1","d_2":"Address 11","d_3":"col4 data","d_4":"col4 data","d_5":"col4 data","d_6":"col4 data","d_7":"col4 data","d_8":"col4 data","d_9":"col4 data","d_10":"col4 data","d_11":"col4 data","d_12":"col4 data","d_13":"col4 data","d_14":"col4 data","d_15":"col4 data","d_16":"col4 data"},
		{"d_0":"003","d_1":"Name 1","d_2":"Address 11","d_3":"col4 data","d_4":"col4 data","d_5":"col4 data","d_6":"col4 data","d_7":"col4 data","d_8":"col4 data","d_9":"col4 data","d_10":"col4 data","d_11":"col4 data","d_12":"col4 data","d_13":"col4 data","d_14":"col4 data","d_15":"col4 data","d_16":"col4 data"}   ,
		{"d_0":"004","d_1":"Name 1","d_2":"Address 11","d_3":"col4 data","d_4":"col4 data","d_5":"col4 data","d_6":"col4 data","d_7":"col4 data","d_8":"col4 data","d_9":"col4 data","d_10":"col4 data","d_11":"col4 data","d_12":"col4 data","d_13":"col4 data","d_14":"col4 data","d_15":"col4 data","d_16":"col4 data"}  ,
		{"d_0":"005","d_1":"Name 1","d_2":"Address 11","d_3":"col4 data","d_4":"col4 data","d_5":"col4 data","d_6":"col4 data","d_7":"col4 data","d_8":"col4 data","d_9":"col4 data","d_10":"col4 data","d_11":"col4 data","d_12":"col4 data","d_13":"col4 data","d_14":"col4 data","d_15":"col4 data","d_16":"col4 data"}        
	 
]   ;
 var measureData = {
        "yc" : [{
            "id" : "d_1",
            "measureName" : "高压母线yc",
            "measureFilter" : '{"filter1":"<","filter1_arg":"5"}',
            "measureisSelect" : true
        }, {
            "id" : "d_2",
            "measureName" : "高压母线",
            "measureFilter" : '{"filter1":"<","filter1_arg":"5"}',
            "measureisSelect" : true
        }, {
            "id" : "d_3",
            "measureName" : "高压母线",
            "measureFilter" : '{"filter1":"<","filter1_arg":"5"}',
            "measureisSelect" : true
        }, {
            "id" : "d_4",
            "measureName" : "高压母线",
            "measureFilter" : '{"filter1":"<","filter1_arg":"5"}',
            "measureisSelect" : true
        }, {
            "id" : "d_5",
            "measureName" : "高压母线",
            "measureFilter" : '{"filter1":"<","filter1_arg":"5"}',
            "measureisSelect" : true
        }, {
            "id" : "d_6",
            "measureName" : "高压母线",
            "measureFilter" : '{"filter1":"<","filter1_arg":"5"}',
            "measureisSelect" : true
        }, {
            "id" : "d_7",
            "measureName" : "高压母线",
            "measureFilter" : '{"filter1":"<","filter1_arg":"5"}',
            "measureisSelect" : true
        }, {
            "id" : "d_8",
            "measureName" : "高压母线",
            "measureFilter" : '{"filter1":"<","filter1_arg":"5"}',
            "measureisSelect" : true
        }, {
            "id" : "d_9",
            "measureName" : "高压母线",
            "measureFilter" : '{"filter1":"<","filter1_arg":"5"}',
            "measureisSelect" : true
        }, {
            "id" : "d_10",
            "measureName" : "高压母线",
            "measureFilter" : '{"filter1":"<","filter1_arg":"5"}',
            "measureisSelect" : true
        }, {
            "id" : "d_11",
            "measureName" : "高压母线",
            "measureFilter" : '{"filter1":"<","filter1_arg":"5"}',
            "measureisSelect" : true
        }, {
            "id" : "d_12",
            "measureName" : "高压母线",
            "measureFilter" : '{"filter1":"<","filter1_arg":"5"}',
            "measureisSelect" : true
        }],
        "yx" : [{
            "id" : "d_13",
            "measureName" : "高压母yx线",
            "measureFilter" : '{"filter1":"<","filter1_arg":"5"}',
            "measureisSelect" : true
        }, {
            "id" : "d_14",
            "measureName" : "高压母线",
            "measureFilter" : '{"filter1":"<","filter1_arg":"5"}',
            "measureisSelect" : true
        }, {
            "id" : "d_15",
            "measureName" : "高压母线",
            "measureFilter" : '{"filter1":"<","filter1_arg":"5"}',
            "measureisSelect" : true
        }],
        "yt" : [{
            "id" : "d_16",
            "measureName" : "高压yt母线",
            "measureFilter" : '{"filter1":"<","filter1_arg":"5"}',
            "measureisSelect" : true
        }, {
            "id" : "d_17",
            "measureName" : "高压母线",
            "measureFilter" : '{"filter1":"<","filter1_arg":"5"}',
            "measureisSelect" : true
        }, {
            "id" : "d_18",
            "measureName" : "高压母线",
            "measureFilter" : '{"filter1":"<","filter1_arg":"5"}',
            "measureisSelect" : true
        }],
        "yk" : [{
            "id" : "d_180",
            "measureName" : "高压yk母线",
            "measureFilter" : '{"filter1":"<","filter1_arg":"5"}',
            "measureisSelect" : true
        }, {
            "id" : "d_20",
            "measureName" : "高压母线",
            "measureFilter" : ' {"filter1":"<","filter1_arg":"5"}',
            "measureisSelect" : true
        }, {
            "id" : "d_21",
            "measureName" : "高压母线",
            "measureFilter" : '{"filter1":"<","filter1_arg":"5"}',
            "measureisSelect" : true
        }]
    };                
	
	var measureData1 = {
        "yc" : [{
            "id" : "d_22",
            "measureName" : "高压母线yc",
            "measureFilter" : '{"filter1":"<","filter1_arg":"5"}',
            "measureisSelect" : true
        }, {
            "id" : "d_23",
            "measureName" : "高压母线",
            "measureFilter" : '{"filter1":"<","filter1_arg":"5"}',
            "measureisSelect" : true
        }, {
            "id" : "d_24",
            "measureName" : "高压母线",
            "measureFilter" : '{"filter1":"<","filter1_arg":"5"}',
            "measureisSelect" : true
        }],
        "yx" : [{
            "id" : "d_25",
            "measureName" : "高压母yx线",
            "measureFilter" : '{"filter1":"<","filter1_arg":"5"}',
            "measureisSelect" : true
        }, {
            "id" : "d_26",
            "measureName" : "高压母线",
            "measureFilter" : '{"filter1":"<","filter1_arg":"5"}',
            "measureisSelect" : true
        }, {
            "id" : "d_27",
            "measureName" : "高压母线",
            "measureFilter" : '{"filter1":"<","filter1_arg":"5"}',
            "measureisSelect" : true
        }],
        "yt" : [{
            "id" : "d_28",
            "measureName" : "高压yt母线",
            "measureFilter" : '{"filter1":"<","filter1_arg":"5"}',
            "measureisSelect" : true
        }, {
            "id" : "d_29",
            "measureName" : "高压母线",
            "measureFilter" : '{"filter1":"<","filter1_arg":"5"}',
            "measureisSelect" : true
        }, {
            "id" : "d_30",
            "measureName" : "高压母线",
            "measureFilter" : '{"filter1":"<","filter1_arg":"5"}',
            "measureisSelect" : true
        }],
        "yk" : [{
            "id" : "d_31",
            "measureName" : "高压yk母线",
            "measureFilter" : '{"filter1":"<","filter1_arg":"5"}',
            "measureisSelect" : true
        }, {
            "id" : "d_32",
            "measureName" : "高压母线",
            "measureFilter" : ' {"filter1":"<","filter1_arg":"5"}',
            "measureisSelect" : true
        }, {
            "id" : "d_33",
            "measureName" : "高压母线",
            "measureFilter" : '{"filter1":"<","filter1_arg":"5"}',
            "measureisSelect" : true
        }]
    };                               
	
	var measureData2 = {
        "yc" : [{
            "id" : "d_34",
            "measureName" : "高压母线yc",
            "measureFilter" : '{"filter1":"<","filter1_arg":"5"}',
            "measureisSelect" : true
        }, {
            "id" : "d_35",
            "measureName" : "高压母线",
            "measureFilter" : '{"filter1":"<","filter1_arg":"5"}',
            "measureisSelect" : true
        }, {
            "id" : "d_36",
            "measureName" : "高压母线",
            "measureFilter" : '{"filter1":"<","filter1_arg":"5"}',
            "measureisSelect" : true
        }],
        "yx" : [{
            "id" : "d_37",
            "measureName" : "高压母yx线",
            "measureFilter" : '{"filter1":"<","filter1_arg":"5"}',
            "measureisSelect" : true
        }, {
            "id" : "d_38",
            "measureName" : "高压母线",
            "measureFilter" : '{"filter1":"<","filter1_arg":"5"}',
            "measureisSelect" : true
        }, {
            "id" : "d_39",
            "measureName" : "高压母线",
            "measureFilter" : '{"filter1":"<","filter1_arg":"5"}',
            "measureisSelect" : true
        }],
        "yt" : [{
            "id" : "d_40",
            "measureName" : "高压yt母线",
            "measureFilter" : '{"filter1":"<","filter1_arg":"5"}',
            "measureisSelect" : true
        }, {
            "id" : "d_41",
            "measureName" : "高压母线",
            "measureFilter" : '{"filter1":"<","filter1_arg":"5"}',
            "measureisSelect" : true
        }, {
            "id" : "d_42",
            "measureName" : "高压母线",
            "measureFilter" : '{"filter1":"<","filter1_arg":"5"}',
            "measureisSelect" : true
        }],
        "yk" : [{
            "id" : "d_43",
            "measureName" : "高压yk母线",
            "measureFilter" : '{"filter1":"<","filter1_arg":"5"}',
            "measureisSelect" : true
        }, {
            "id" : "d_44",
            "measureName" : "高压母线",
            "measureFilter" : ' {"filter1":"<","filter1_arg":"5"}',
            "measureisSelect" : true
        }, {
            "id" : "d_45",
            "measureName" : "高压母线",
            "measureFilter" : '{"filter1":"<","filter1_arg":"5"}',
            "measureisSelect" : true
        }]
    };                                                                      
                                                         


            var treeGridData = [
               {
                   "id": "1", "name": "高压母线", "allow-measure": "","select-measure":measureData,
                   "children":
                    [
                        {
                            "id": "2", "name": "主变", "allow-measure": "","select-measure": measureData1,
                            "children":
                            [
                                { "id": "3", "name": "#2无功补偿SVG", "allow-measure": "","select-measure":measureData2},
                                {
                                    "id": "4", "name": "35kV母线", "allow-measure": "","select-measure": measureData,
                                    "children":
                                    [
                                        { "id": "5", "name": "#1段集电线", "allow-measure": "","select-measure": ""},
                                        { "id": "6", "name": "#1段集电线", "allow-measure": "","select-measure": "",
                                            "children":
                                            [
                                                { "id": "7", "name": "#1机组", "allow-measure": "","select-measure": "" },

                                                { "id": "8", "name": "#2机组", "allow-measure": "","select-measure": "" },
                                            ]

                                         },

                                        { "id": "9", "name": "#2段集电线", "allow-measure": "","select-measure": "",
                                           "children":
                                            [
                                                { "id": "10", "name": "#1机组", "allow-measure": "","select-measure": "" },

                                                { "id": "11", "name": "#2机组", "allow-measure": "","select-measure": "" },
                                            ]
                                         },
                                    ]
                                }
                            ]
                        },
                        {
                            "id": "12", "name": "主变", "allow-measure": "","select-measure": "",
                            "children":
                            [
                                { "id": "13", "name": "#2无功补偿SVG", "allow-measure": "","select-measure": ""},
                                {
                                    "id": "14", "name": "35kV母线", "allow-measure": "","select-measure": "",
                                    "children":
                                    [
                                        { "id": "15", "name": "#1段集电线", "allow-measure": "","select-measure": ""},
                                        { "id": "16", "name": "#1段集电线", "allow-measure": "","select-measure": "",
                                            "children":
                                            [
                                                { "id": "17", "name": "#1机组", "allow-measure": "","select-measure": "" },

                                                { "id": "18", "name": "#2机组", "allow-measure": "","select-measure": "" },
                                            ]

                                         },

                                        { "id": "19", "name": "#2段集电线", "allow-measure": "","select-measure": "",
                                           "children":
                                            [
                                                { "id": "20", "name": "#1机组", "allow-measure": "","select-measure": "" },

                                                { "id": "21", "name": "#2机组", "allow-measure": "","select-measure": "" },
                                            ]
                                         },
                                    ]
                                }
                            ]
                        }
                    ]
               }
            ];